#!/usr/bin/perl
use warnings;
use strict;

#ref to variable
my $var1 = 100;

my $ref = \$var1;

print "ref= " . $$ref . "\n";

#ref to array

my @arr1 = ("truong", 31, "thung");

$ref = \@arr1;

print "ref[0]= " . @$ref[0] . "\n";

#ref to hash
our $login_info = {
	id   => 0,
	name => "thung",
	dir  => "/home/thung"
};


#$ref = \%login_info;

#print "ref{\"id\"}= " . %$ref->{"name"} .  "\n";

print $login_info->{id} . "\n";  


